/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Necesidad.Ventas.Vista;

import Necesidad.Ventas.Controlador.FiltrosVentasControlador;
import sape.MenuControlador;

/**
 *
 * @author Melissa
 */
public class FiltrosVentas extends javax.swing.JInternalFrame {
    public FiltrosVentasControlador controlador;

    /**
     * Creates new form FiltrosVentas
     */
    public FiltrosVentas() {
        initComponents();
    }

    public FiltrosVentas(MenuControlador menuControlador) {
        this.controlador=new FiltrosVentasControlador(this,menuControlador);
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlFiltros = new javax.swing.JPanel();
        pnlHorasExtra = new javax.swing.JPanel();
        chkHorasExtra = new javax.swing.JRadioButton();
        pnlNumeroPedidos = new javax.swing.JPanel();
        chkNumeroRealizados = new javax.swing.JRadioButton();
        chkNumeroRetrasados = new javax.swing.JRadioButton();
        btnGenerar = new javax.swing.JButton();
        pnlIntervaloFechas = new javax.swing.JPanel();
        lbFechaInicio = new javax.swing.JLabel();
        tbFechaInicio = new javax.swing.JTextField();
        lbFechaFin = new javax.swing.JLabel();
        tbFechaFin = new javax.swing.JTextField();
        pnlTipoVehiculo = new javax.swing.JPanel();
        lbTipo = new javax.swing.JLabel();
        cmbTipo = new javax.swing.JComboBox();

        setBorder(null);
        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setMaximizable(true);
        setTitle("Venta");

        pnlFiltros.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Reporte", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Segoe UI", 1, 13), new java.awt.Color(0, 51, 102))); // NOI18N

        pnlHorasExtra.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cliente", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Segoe UI", 1, 12), new java.awt.Color(0, 51, 102))); // NOI18N

        chkHorasExtra.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        chkHorasExtra.setForeground(new java.awt.Color(0, 51, 102));
        chkHorasExtra.setText("Ordenados por nombre");

        javax.swing.GroupLayout pnlHorasExtraLayout = new javax.swing.GroupLayout(pnlHorasExtra);
        pnlHorasExtra.setLayout(pnlHorasExtraLayout);
        pnlHorasExtraLayout.setHorizontalGroup(
            pnlHorasExtraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHorasExtraLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(chkHorasExtra)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        pnlHorasExtraLayout.setVerticalGroup(
            pnlHorasExtraLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHorasExtraLayout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addComponent(chkHorasExtra)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pnlNumeroPedidos.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cumplimiento", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Segoe UI", 1, 12), new java.awt.Color(0, 51, 102))); // NOI18N

        chkNumeroRealizados.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        chkNumeroRealizados.setForeground(new java.awt.Color(0, 51, 102));
        chkNumeroRealizados.setText("Ordenados por tiempo");
        chkNumeroRealizados.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkNumeroRealizadosActionPerformed(evt);
            }
        });

        chkNumeroRetrasados.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        chkNumeroRetrasados.setForeground(new java.awt.Color(0, 51, 102));
        chkNumeroRetrasados.setText("Ordenados por cantidad de pedidos");
        chkNumeroRetrasados.setActionCommand("Ordenados por número de realizados");
        chkNumeroRetrasados.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkNumeroRetrasadosActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlNumeroPedidosLayout = new javax.swing.GroupLayout(pnlNumeroPedidos);
        pnlNumeroPedidos.setLayout(pnlNumeroPedidosLayout);
        pnlNumeroPedidosLayout.setHorizontalGroup(
            pnlNumeroPedidosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlNumeroPedidosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlNumeroPedidosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlNumeroPedidosLayout.createSequentialGroup()
                        .addComponent(chkNumeroRealizados)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(pnlNumeroPedidosLayout.createSequentialGroup()
                        .addComponent(chkNumeroRetrasados)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
        );
        pnlNumeroPedidosLayout.setVerticalGroup(
            pnlNumeroPedidosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlNumeroPedidosLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(chkNumeroRealizados)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(chkNumeroRetrasados)
                .addContainerGap(34, Short.MAX_VALUE))
        );

        btnGenerar.setFont(new java.awt.Font("Segoe UI", 1, 13)); // NOI18N
        btnGenerar.setForeground(new java.awt.Color(0, 51, 102));
        btnGenerar.setText("Generar");

        pnlIntervaloFechas.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Fecha", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Segoe UI", 1, 12), new java.awt.Color(0, 51, 102))); // NOI18N

        lbFechaInicio.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        lbFechaInicio.setForeground(new java.awt.Color(0, 51, 102));
        lbFechaInicio.setText("Fecha Inicio");

        tbFechaInicio.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        tbFechaInicio.setForeground(new java.awt.Color(0, 51, 102));
        tbFechaInicio.setEnabled(false);

        lbFechaFin.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        lbFechaFin.setForeground(new java.awt.Color(0, 51, 102));
        lbFechaFin.setText("Fecha Fin");

        tbFechaFin.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        tbFechaFin.setForeground(new java.awt.Color(0, 51, 102));
        tbFechaFin.setEnabled(false);
        tbFechaFin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tbFechaFinActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlIntervaloFechasLayout = new javax.swing.GroupLayout(pnlIntervaloFechas);
        pnlIntervaloFechas.setLayout(pnlIntervaloFechasLayout);
        pnlIntervaloFechasLayout.setHorizontalGroup(
            pnlIntervaloFechasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIntervaloFechasLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlIntervaloFechasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbFechaInicio)
                    .addComponent(lbFechaFin))
                .addGap(41, 41, 41)
                .addGroup(pnlIntervaloFechasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(tbFechaInicio, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(tbFechaFin, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 27, Short.MAX_VALUE))
        );
        pnlIntervaloFechasLayout.setVerticalGroup(
            pnlIntervaloFechasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIntervaloFechasLayout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addGroup(pnlIntervaloFechasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbFechaInicio)
                    .addComponent(tbFechaInicio, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(pnlIntervaloFechasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbFechaFin)
                    .addComponent(tbFechaFin, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(67, Short.MAX_VALUE))
        );

        pnlTipoVehiculo.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Producto", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Segoe UI", 1, 12), new java.awt.Color(0, 51, 102))); // NOI18N

        lbTipo.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        lbTipo.setForeground(new java.awt.Color(0, 51, 102));
        lbTipo.setText("Tipo");

        cmbTipo.setFont(new java.awt.Font("Segoe UI", 0, 12)); // NOI18N
        cmbTipo.setForeground(new java.awt.Color(0, 51, 102));
        cmbTipo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        javax.swing.GroupLayout pnlTipoVehiculoLayout = new javax.swing.GroupLayout(pnlTipoVehiculo);
        pnlTipoVehiculo.setLayout(pnlTipoVehiculoLayout);
        pnlTipoVehiculoLayout.setHorizontalGroup(
            pnlTipoVehiculoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTipoVehiculoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lbTipo)
                .addGap(67, 67, 67)
                .addComponent(cmbTipo, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 46, Short.MAX_VALUE))
        );
        pnlTipoVehiculoLayout.setVerticalGroup(
            pnlTipoVehiculoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTipoVehiculoLayout.createSequentialGroup()
                .addGap(39, 39, 39)
                .addGroup(pnlTipoVehiculoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbTipo)
                    .addComponent(cmbTipo, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout pnlFiltrosLayout = new javax.swing.GroupLayout(pnlFiltros);
        pnlFiltros.setLayout(pnlFiltrosLayout);
        pnlFiltrosLayout.setHorizontalGroup(
            pnlFiltrosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlFiltrosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlFiltrosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnlTipoVehiculo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlHorasExtra, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlFiltrosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlNumeroPedidos, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlIntervaloFechas, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
            .addGroup(pnlFiltrosLayout.createSequentialGroup()
                .addGap(225, 225, 225)
                .addComponent(btnGenerar, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlFiltrosLayout.setVerticalGroup(
            pnlFiltrosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlFiltrosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlFiltrosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(pnlIntervaloFechas, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlTipoVehiculo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlFiltrosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlNumeroPedidos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pnlHorasExtra, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(35, 35, 35)
                .addComponent(btnGenerar, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(63, 63, 63))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlFiltros, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlFiltros, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void chkNumeroRealizadosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkNumeroRealizadosActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_chkNumeroRealizadosActionPerformed

    private void chkNumeroRetrasadosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkNumeroRetrasadosActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_chkNumeroRetrasadosActionPerformed

    private void tbFechaFinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tbFechaFinActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_tbFechaFinActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(FiltrosVentas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(FiltrosVentas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(FiltrosVentas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(FiltrosVentas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FiltrosVentas().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnGenerar;
    private javax.swing.JRadioButton chkHorasExtra;
    private javax.swing.JRadioButton chkNumeroRealizados;
    private javax.swing.JRadioButton chkNumeroRetrasados;
    private javax.swing.JComboBox cmbTipo;
    private javax.swing.JLabel lbFechaFin;
    private javax.swing.JLabel lbFechaInicio;
    private javax.swing.JLabel lbTipo;
    private javax.swing.JPanel pnlFiltros;
    private javax.swing.JPanel pnlHorasExtra;
    private javax.swing.JPanel pnlIntervaloFechas;
    private javax.swing.JPanel pnlNumeroPedidos;
    private javax.swing.JPanel pnlTipoVehiculo;
    private javax.swing.JTextField tbFechaFin;
    private javax.swing.JTextField tbFechaInicio;
    // End of variables declaration//GEN-END:variables
}
